const { resolve } = require('node:path')
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  publicPath: process.env.NODE_ENV === 'production' ?'/SmartEvaluatePages/web/':'/',
  // assetsDir: '/SmartEvaluatePages/web/static',
  productionSourceMap: false,
  configureWebpack: {
    resolve: {
      extensions: ['.js', '.vue', '.json'],
      alias: {
        'vue$': 'vue/dist/vue.esm.js',
        '@': resolve('src'),
      }
    }
  },
  devServer: {
    proxy: {
      '/api': {
        target: 'https://t.shijiwxy.5tree.cn', // 目标地址
        changeOrigin: true,
        secure: true,
        pathRewrite: {
          '^/api': '' // 将多出来的公共请求头设置为空
        }
    }
  }
},
})
